<template>
  <div>
    <!-- 面包屑管理区域 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/homeone' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>订单管理</el-breadcrumb-item>
      <el-breadcrumb-item>订单列表</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片视图 -->
    <el-card>
      <el-row :gutter="20">
        <el-col :span="8"
          ><el-input placeholder="请输入内容">
            <el-button
              slot="append"
              icon="el-icon-search"
            ></el-button> </el-input
        ></el-col>
      </el-row>
    </el-card>
  </div>
</template>

<script>
// import axios from 'axios'
// import { axios } from 'vue/types/umd'
export default {
  data() {
    return {
      data: null,
      // 默认
      queryInfon: {
        query: '',
        pagename: 1,
        pagesize: 10,
      },
      total: 0,
      orderlist: [],
    }
  },
  created() {
    this.getOrderList()
  },
  methods: {
    getOrderList() {
      const url = 'orders'
      this.axios.get(url).then(
        (res) => {
          console.log('res:', res)
          this.data = res.data
          if (res.data.meta.status !== 200) {
            console.log('res', res)
            return this.$message.error('获取数据失败！')
          }
        },
        { params: this.queryInfon }
      )
    },
    // const { data: res } = await this.$http.get('categories', {
    //   params: this.queryInfon,
    // })

    // return this.$message.success('获取成功！')
    // this.total
    // console.log('res', res)

    // this.$http.get('orders')
  },
}
</script>

<style lang="scss" scoped></style>
